Implementing gradient descent for multiple regression